Skin::pageStats() has checks meant to catch this already. If they're faulty, fix them there.
}
function printFooter() {
- global $wgArticle;
- // Under certain conditions, $wgArticle might not be an object which would cause a fatal error like this:
- // Fatal error: Call to a member function getID() on a non-object in ../includes/Skin.php on line 1270
- // To prevent this, we'll check first if $wgArticle is an object and if that's the case, then we'll load the page stats.
- $stats = ( is_object( $wgArticle ) ? "<p>" . $this->pageStats() . "</p>\n" : '' );
return "<p>" . $this->printSource() .
- "</p>\n\n" . $stats;
+ "</p>\n\n<p>" . $this->pageStats() . "</p>\n";
}
/** overloaded by derived classes */